import { defineConfig } from "vite";
import uni from "@dcloudio/vite-plugin-uni";
import { resolve } from 'path'; 

const pathResolve = (dir: string) => {
	return resolve(__dirname, '.', dir);
};

const alias: Record<string, string> = {
	'/@': pathResolve('./src/'),
	'vue-i18n': 'vue-i18n/dist/vue-i18n.cjs.js',
	'@': pathResolve('./src/'),
	'public': resolve('public')
};

// https://vitejs.dev/config/
export default defineConfig({
	 base:'./',
  plugins: [uni()],
  resolve: { alias }
});
